app.controller('jiucontentCtrl',function  ($scope,$state,$http) {
	console.log($state.params)
	$scope.newDate = $state.params
	
	$http.get('/api/api', {
		params: {
			client:{"ageGroup":"AG_0to24","channel":"QD_web_webkit","deviceId":"0","gender":"0","imei":"0","packageName":"com.culiu.purchase","platform":"wap","sessionId":"0","shopToken":"0","userId":"0","version":"1.0","xingeToken":""},
			query:{"module":"99","tab":"all"}
		}
	}).then(function(res) {
		$scope.jiukuaicontent = res.data.data.groupList[1].dataList
         console.log($scope.jiukuaicontent)
         //对数组进行乱序
         $scope.jiukuaicontent.sort(function(a,b) {
         	var pp = Math.random()>0.5?1:-1
         	return (a.id-b.id)*pp
         })
         console.log($scope.jiukuaicontent)
	})
})